﻿// Copyright (c) 2014 Morten Bakkedal
// This code is published under the MIT License.

using System;

namespace FuncLib.DualFunctions.Expressions
{
	internal class VariableExpression : Expression
	{
		private DualVariable variable;

		public VariableExpression(DualVariable variable)
		{
			this.variable = variable;
		}

		public override string GenerateCode()
		{
			return "x[" + variable.FunctionIndex + "]";
		}
	}
}
